<template>
	<view class="page">
		<unit-div :userMsg='userMsg'></unit-div>
		<div class="myUnit">
			<div style="display: flex;">
				<div class="menuDiv" v-for="item in list" @click="goNav(item)">
					<uni-icons :type="item.icon" size="30px" :color='item.color'></uni-icons>
					<div style="width: 10px;"></div>
					<div class="textDiv">
						<div class="name">{{item.name}}</div>
						<div class="text">{{item.text}}</div>
					</div>
				</div>
			</div>
		</div>
		<div class="myUnit">
			<div style="display: flex;">
				<div class="menuDiv" v-for="item in list2" @click="goNav(item)">
					<uni-icons :type="item.icon" size="30px" :color='item.color'></uni-icons>
					<div style="width: 10px;"></div>
					<div class="textDiv">
						<div class="name">{{item.name}}</div>
						<div class="text">{{item.text}}</div>
					</div>
				</div>
			</div>
		</div>
	</view>
</template>

<script>
	import {
		allTaskCount
	} from "@/api/system/user.js"
	export default {
		data() {
			return {
				userMsg: {
					nickName: '',
					deptName: ''
				},
				list: [{
						name: '工程检测概况',
						text: '工程检测数据总览',
						icon: 'navigate',
						color: '#0275a1',
						url: '/subPage/dataMng/projectList'
					},
					{
						name: '实时检测详情',
						text: '实时检测数据查看',
						icon: 'minus',
						color: '#009688',
						url: '/subPage/dataMng/pileList',
					}
				],
				list2: [{
						name: '归档报告查阅',
						text: '入库归档报告查阅',
						icon: 'checkbox',
						color: '#795548',
						url: '/subPage/dataMng/reportList',

					},
					{
						name: '不合格报告',
						text: '不合格报告台账',
						icon: 'close',
						color: '#03A9F4',
						url: '/subPage/dataMng/reportNoList',
					}
				]
			}
		},
		methods: {
			show() {
				let form = uni.getStorageSync('storage_data')
				this.userMsg.nickName = form.vuex_nickName
				this.userMsg.deptName = form.vuex_deptName
			},
			goNav(e) {
				uni.navigateTo({
					url: e.url
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	.myUnit {
		margin: 0;
	}

	.menuDiv {
		flex: 1;
		height: 80px;
		background: #f3f4f5;
		display: flex;
		align-items: center;
		margin: 5px;
		border-radius: 10px;
		justify-content: center;
	}

	.textDiv {
		text-align: center;
		line-height: 30px;
	}

	.name {
		font-weight: bold;
	}

	.text {
		font-size: 13px;
		color: #666;
	}
</style>